import request from "./request.js"

///2、获取用户基本信息
export const login = (params) => {
  return request(`/user/querySingle`, "POST", params)
}

//3、整体发电概况接口：
export const getPowerOverview = (params) => {
  return request(`/dashboard/powerOverview`, "POST", params)
}

//4、电站总数接口：
export const getStationStatus = (params) => {
  return request(`/dashboard/stationStatus`, "POST", params)
}

//5、发电图表接口：
export const getAllPowerHistory = (params) => {
  return request(`/dashboard/allPowerHistory`, "POST", params)
}

//6、电站列表接口：
export const getStationQueryList = (params) => {
  return request(`/station/queryList`, "POST", params)
}

//7、设备列表接口：
export const getDeviceQueryList = (params) => {
  return request(`/device/queryList`, "POST", params)
}

//7.1、设备数量接口：
export const getDeviceQueryCount = (params) => {
  return request(`/device/queryCount`, "POST", params)
}

//7.2添加数采接口
export const saveDevice = (params) => {
  return request(`/device/saveSingle`, "POST", params)
}


//8、电站详情
//A）数据看板：
export const getStationchild = (params) => {
  return request(`/station/child`, "POST", params)
}
// B）设备
// 拿前面设备接口，带一个电站Id参数,同7
// {
// 	stationId：当前电站Id
// }

// C）报警
export const getAlarmQueryList = (params) => {
  return request(`/alarm/queryList`, "POST", params)
}

// D）关于电站
//电站信息接口:
export const getStationQuerySingle = (params) => {
  return request(`/station/querySingle`, "POST", params)
}
//图片列表接口：
export const getStationImagesList = (params) => {
  return request(`/station/imagesList`, "POST", params)
}

//9、逆变器详情页----详细信息
export const getDeviceQueryInverterDetails = (params) => {
  return request(`/device/queryInverterDetails`, "POST", params)
}
//10、逆变器详情页---连接信息
export const getDeviceQueryConnection = (params) => {
  return request(`/device/connection`, "POST", params)
}

//11、逆变器详情页---历史信息
export const getDeviceQuerydcHistory = (params) => {
  return request(`/device/dcHistoryData`, "POST", params)
}
//12. 逆变器详情页---修改逆变器安装位置
export const updateAddress = (params) => {
	return request(`/device/updateSingle`, "POST", params)
}
//交流分析接口
export const getDeviceQueryHistory = (params) => {
  return request(`/device/historyData`, "POST", params)
}
//功率接口
export const getDeviceQuerydcPowerList = (params) => {
  return request(`/device/dcPowerList`, "POST", params)
}

//12、监控器详情页----详细信息
export const getDeviceQueryMonitorDetails = (params) => {
  return request(`/device/queryMonitorDetails`, "POST", params)
}

//13、监控器详情页---历史信息
export const getDeviceMonitorHistoryData = (params) => {
  return request(`/monitorAmount/monitorHistoryData`, "POST", params)
}

//14、监控器详情页---详情
export const getDeviceQuerySingle = (params) => {
  return request(`/weatherStation/querySingle`, "POST", params)
}
//15、监控器详情页---发电热力图
export const getDeviceAmountMap = (params) => {
  return request(`/monitorAmount/amountMap`, "POST", params)
}
//16、监控器详情页---温度热力图
export const getDeviceTempMap = (params) => {
  return request(`/monitorAmount/tempMap`, "POST", params)
}

//17、设备详情页---气象站
export const getDeviceWeatherStation = (params) => {
  return request(`/weatherStation/querySingle`, "POST", params)
}
//18、电站数据看板日月年图表数据（新增）
export const getStationHistoryData = (params) => {
  return request(`/station/stationHistoryData`, "POST", params)
}
//19、新增电站
export const saveAddForm = (params) => {
  return request(`/station/saveSingle`, "POST", params)
}
//20、区域请求
export const getRegionData = (params) => {
  return request(`/area/queryList`, "POST", params)
}

//21、电表详情
export const getQueryMeterDetails = (params) => {
  return request(`/device/queryMeterDetails`, "POST", params)
}

//22、告警详情图
export const getAlarmHistoryData = (params) => {
  return request(`/alarm/alarmHistoryData`, "POST", params)
}

//23、我的请求
export const getCurrentUser = (params) => {
  return request(`/user/currentUser`, "POST", params)
}
//24、商家信息请求
export const getMerchantInfo = (params) => {
  return request(`/merchant/queryMerchant`, "POST", params)
}
